<template>
    <ul>
        <HotSongItem :hotsong="hotsong" :index="index+1+''" v-for="(hotsong,index) in hotsongs" :key="index"/>
    </ul>
</template>

<script>
    import HotSongItem from '@/components/HotSongItem.vue'
    export default {
        data(){
            return {
                hotsongs:[]
            }
        },
        components:{
            HotSongItem
        },
        created(){
            this.axios.get('https://apis.netstart.cn/music/playlist/detail?id=3778678').then( res => {
                this.hotsongs = res.data.playlist.tracks;
                this.hotsongs = this.hotsongs.splice(0,20);
            } )
        }
    }
</script>

<style lang="less" scoped>

</style>